Patch to Fix Bug-793785 and Bug-881185

This commit fixes the two bugs in Kitsune. 
These are the bugs. http://bugzill.la/793785 & http://bugzil.la/881185