Bug fixes and delete button