Added payload len check