Fix for user state loss when it is modified