fixing issues with variables on touch screens