bug fix
improved test case