Improved #3 and #6

Fixed a couple of bugs in the post/term fixing script