fix some bugs and unmask others