Wait for last frame to finish before calling onEnd

onEnd gets called straight away, skipping the last frame