Sometimes you won't be able to get off a double jump after doing a seemingly "normal" single jump from the ground. Here is the explanation of how the game handles jumps: