fixes recommended by ryan