Don't make the agent crash in case of missing modules. Fix #315