fix possible NPE
fix showing settings