fixed bugs and edited delete button