Run only on valid modules. Fixes #5