Make Fragment  implementation more conforming to the coding guidelines. ...

...Fixes crash on rotation