fixed a bug where touchscreen was crashing