fixed annoying undefined set bug