fix for resize