Fix installation bugs