Fixed travis && some bugs