fixed mdel errors and added check for an existing filter on mdel