FIx some bugs on touch screens