Pull Request for Fixes to Bugs #421 and #426

The changes encapsulated by this pull request address the bugs #421 and #426. Please review them and let us know what needs to be changed. Thank you.