eliminated width bug in resize