Fixed error of replacing fragments