Merged in couple minor fixes from trunk