Fixed insertMiddle()