Fixes #1 by improving tests