Fix bugs on fragments