bugfix for nested conditions