Fix some installation bugs