Fix for #314