fix bugs related to binvars/setting bounds