Fix compile time errors in code