Add a dummy test and fix some bugs