Fix for #877