hopefully a fix for the resize problem