Fix shared condition in different scopes