Fixed #1659 #1661