smart mac in progress. fixed bug in nib