Fix some bugs in post proc.