Implemented patch. Fixes #16