correct some return and remove unneeded check