Why do my single-jumps sometimes count as double-jumps?

I think that this is happening because you fall off the ledge slightly just before you press the jump button. This would cause it to be a double jump because you are jumping while falling/in the air even though you only pressed the jump button once.