fix crypto: invalid object in debug version