Sheriff breaking law to alleviate jail overcrowding