pugrade bug fixes