catch it before changing resolution