Added prediction length check to serverside code