Fixed the database executions