Fixing crypt code