problems with set_compare and similar functions