fix ability and sorting