Small corrections to the database sql script