fixed crash..but resize still sucks.