Don't loose top error in SSL Closes: #775 (cherry-picked) (cherry picked from commit a30d6d85219ea80c16df6da4f6a9430254e5a0da)