Thank you for the feedback. I had all the input code in the physics_update which I think is why it misses inputs randomly. Good knowledge for the next time.