#2 fixes for database type matching