fix order of checks to actually determine correct backend