Fixing title bug when resizing