fixed bug with removing resize listener twice