Fix Javascript load function error and database connection error.