Fixing the allow_empty behavior