fixed issue where resize might be off by a bit