#507 fixed