Fixed #1247