fixed issue where train position wasn't being updated properly