Fixed possible error when deleting.
Added better modal display.