attempt to fix re-render issue with userState