Fixed template and database error.