Improved PUG handling.