fixed insert bug