Add test and fix