Fixed bug causing crash in dialogfragment