Fixed nullpointer to fragment manager in main activity