Fix for #310