fix mac compiling, fix renderer, fix other minor compiling issues