Fix fasands of errors from dodgy PR code