A number of fixes relating to Peter Onyisi's Parrot issues

This pull request resolves #340.