start end bug fix