Build fixes

Fixed miscellaneous build issues :)