Fix for #599 (continue #613)