Fixed insertLines bug