I don't know if I understood correctly, is the problem related to how fast the level ends after the last enemy is defeated, or related to the level finishing before all enemies are defeated?
In the first case, I suggest checking the functions falldie and nodieblink in your enemy characters, as...