fix compile issues and update gitignore