Updated call to insert_at to be compatible with new API