fixes issues #578

This is intended to resolve #578