fix errors tristan pointed out