fixed module check method

Was throwing an undefined error on ui previously