fix module check so it behaves as intended
Merge pull request #505 from natevw/bad-extend

fix module check so it behaves as intended