Fixed #1046