Solved bug at insertions loop