Improve decryption handling for padding