Fix collision detection by checking inside