fixed multiple instance bug