fixing bug in SSL handshake area. could have been causing puma crashes, unsure