quick bug fix with module indexing