Fixed #509