Fixed #1005