fix for #518

#518