Added where activity != 0 condition to Pilot entity