fix bug with #15, closes #14