Fixed the database bugs and screw this project