Fixed bug in insertion function call.