Solving bug begin/end