Fixed routing error and db schema