Fix for #297