Fixing some side effects of using encryption