add test and fix