added resize fix