Fix should_continue to be inside the if loop