Correct updated version of database script