fix checks for inside/outside