fixes from rSmart