Oh, derp! Added error handling to sqrt too!