Fixed regression bug, closes #1