Media Object bug fixes

Fix for issues #244  and #245