fix subtle bug where published method depends on model attributes