fix some weird fragment bugs