Will rename the parameter "flags" instead of "flags2" in next pull request, because that is what is seen by users in javadoc etc.