fix for #310