fix some more stuff based on Omer's comments