fix bugs of returning wrong objects