Fix for #546