How can i fix a skill which uses 20 mana and works fine until the very last 20 mana remaining which then it skips the attack ?

IMO somewhere there is the condition Mana > 0 when it should be Mana >= 0.