fixed fragment exception & window leak
fixed some problems