fix for issue #314