Bug fix for correctly selecting invisible trial phase.