Propagate Z+X bug fix from development branch