fixed delete button style and added check before delete