Fix dispose calculations

- use correct dispose mode
- only apply the dispose on extent of the previous frame