fix warnings by remove code