SC warns government to mend ways