fixed bug with private subs