fixing a bug in error handling where initial modules can't be found