fix "finish" method for fragments.