RaycastHit2D ground detection

Hi,
Im making a 2d platformer game where the player can jump once and if he kills something midair he can jump again. Now im using RaycastHit2D to check if the player is grounded but now I have the problem that somehow the player can jump twice without killing anything midair.

Im trying to solving this problem for a long time now and have no idea how to fix it. Does anyone have a idea how to fix this?

here is the part where I check the ground:

	private void CheckGround() {
		// Mid Air Control
		RaycastHit2D groundRay =  Physics2D.Raycast ( this._transform.position, -Vector2.up, 1F, 1 << LayerMask.NameToLayer("Ground") );
		// Grounded
		if ( groundRay ){
			isMidAir = false;
			anim.SetBool("isMidAir", false );
			jumpEnabled=true;
		}
		// Not grounded
		else{
			isMidAir = true;
			anim.SetBool("isMidAir", true );
		}
	}

Probably can jump twice because the width of the ray. Why don’t you try using Physics2D.OverlapCircle ? Just create a little empty gameobject, set it below the character where you want to check if it’s grounded, set a radius and use the same LayerMask you’re using with the raycast.