Fixed two major end conditon + post-processing bugs.