Fixed #505