Fixed weird compilation errors