Fix compilation errors&warnings for 2.11