fix stack underflow
Merge pull request #17 from oscar-broman/patch-1

fix stack underflow