minor reference and error handling fixes
fixed underscore issue in new inclusions