fixed major bug in conditional