connection
fixed a bug with the checkdb function