Fix for #599 (continue #613)

Fix for #599 (continue #613)