Fix test error and add new test