Building fixes

I made some changes which caused errors/warning for me.