added gui collision detection