Add test
Fix issues