Fixed #1039