Fixed some compilation errors