bugfix invalid condition