Fix bugs for ambigious method call