Fix return value.
Add package tests.