fix issue #98

The if/else code in scatter() is duplicated.