resize and memory issues