test and fix bug