Fix a lot of issues IDd by PTX