fixed encryption problems