Don't trim the last frame below 20 ms to avoid switching mode