fixted end bug