Fix some bugs

Finish the example from
http://android-developers.blogspot.in/2012/05/using-dialogfragments.html