Removed checkFlag dependency.