Added delete button but with bug. If delete the nth item it will delete the nth -1 item instead.