Fixed insert bug