Fix bug at fragment creation