fix error handling
change underscore -> lodash