Fixed database script