closes #14 handle image deletion properly