fixed a long standing bug in physics