Added mainaction flag