Bug fix in case where encryption is performed before setting params