Fix a bug in support calculation

Fixes #2.