add test and fix for test