Bugfixes for post processing code