Fix some bugs and add repositories