Altered some test and fix some bugs!