Handle window resizes better