avoid bugs with intermediate states