change fragment to avoid npe