Fixed start/end bug