Fixed all compilation errors