fixed memory leak in usermanager