fixed null pointer on decrypt