refactor ride update and fix bugs