added some more flash detection