fixed some errors in route and model