User state loss fixes