Fixed compilation errors in all platforms