Crash fix while tab change