Fixed some compile time errors