fixed errors logging out of modules