Sunderland loanee learned lesson from Motherwell dismissal