Bad begin/end corrected