fix bugs and refactor ride update