Fixing errors due to progress rounding and last animation block running twice

1. When checking if progress is done by comparing with 0.001 (or 0.999) you will always get a rounding error, especially noticeable if you have long animations. My solution is to only check if progress is larger than or equal to 1, which is the larges possible value the progress can be.
2. When fixing the first issue, the last animation block was run twice, i.e. the animation block could return a progress of 1.0 but it wasn't finished, so it run the block with progress of 1.0 again.