Fix bug and test flash run localhost