Improve fragment switching