fixed methods in SQLDatabase