Added collision detection for items on the map