Fix bug in installing flex.