Fix compile-time errors/warnings