Fix #520

Relates to #520