fixed sorting by name bug