fixed length check
reintroduced workaround from d684b83