fixed crash on orientation change