Issue #509 fixed