changed the partial check, to add a failsafe in case the length goes over the limit