fix company query bug