Fix: issue #509

Fix issue #509