minor bugfix. The previous few commits fixed issues #22, #23, #24, #27.