Fixed #520, related to #452