Changed check on modules array