Bugfix/fix factoid length check