Fixed the MYSQL errors