Fix length check for browser compatibility