Model deletion fixes