Fixed error in register cookie