fix mklocation to treat empty strings properly