fixing compile bugs (except missing images) in branch