Fixes for decrypt and sign