removed unnecessary check for a modules object