Fixes work items 24072 and 24044

http://dnnblog.codeplex.com/workitem/24072
https://dnnblog.codeplex.com/workitem/24044