Fix .gitignore
Fixed some bugs