fix crash on exit/fix item render