fixed crash during screen orientation change.