fixes to issues #141 #143 and #128 for inline media
#141 Fixed error that broke regular add media
Merge pull request #145 from pencilblue/PB128

fixes to issues #141 #143 and #128 for inline media