Add check for Rigid property before executing the code that updates the body