Fix a crash bug in Tablet