fixing postgresql and sqlite3 support