Fix the logic by inversing the require statements.