Bug fixes to ecryption and submit events