Added dependent: :destroy for email_subscriptions
Fixed some bugs in execute_daily_tasks.