Fixed rest API working on wrong database