Add fragment XML layouts and fix crash