fixed bug in quality flagging for high power signals