fixes focus and flickery focus
some pns code