Fix bug in disabling/enabling delete button

Made an error with the last fix