Corrected a warning in setFirst function in ml implementation