fix migration and routes
fix bugs