Apparently that redundant variable as flag is needed