fix bug causing affecting first object