Bug fixes for new logic conditions.