Fixed database close command.