fixed pointer issues now to fix physics update