Test Unit and fix for #4