fixes #354

A quick fix for issue #354.