fixing two issues Max found