several fixes and tests for set_ops