Fix use strict error in error handling logic