Fixed issues with uid.dat and session.lock