aha, switching curly braces to do/end appears to have fixed it