Add a condition to global fix

Thanks @nenadjelovac