# Jump script is letting me double jump for some reason. Not detecting isGrounded properly [duplicate]

I am using the following Jump script. As I understand it, as soon as I jump it should detect that I'm not grounded and therefore prevent me from jumping again.

However, I am seeing in the Inspector that when I jump, "IsGrounded" remains checked, and only unchecks when I double-jump. Why might this be? I have the capsule collider the exact height of the character and the collider is definitely leaving the ground upon First jump.

using UnityEngine;
using System.Collections;

[RequireComponent(typeof(Rigidbody))]
public class Movement : MonoBehaviour
{
public Vector3 jump;
public float jumpForce = 2.0f;

public bool isGrounded;
Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
jump = new Vector3(0.0f, 2.0f, 0.0f);
}

void OnCollisionStay()
{
isGrounded = true;
}

void LateUpdate()
{
if (Input.GetKeyDown(KeyCode.Space) && isGrounded)
{