Minor fix
Add some tests