Wait for last frame to finish before calling onEnd
Merge pull request #1 from tomconroy/onend-patch

Wait for last frame to finish before calling onEnd