main & listener correction for warning flag