fix onBack null pointer exception