fixing bug in bind, using bind for resize