Skarmark 1080626

This PR fixes all the 3 bugs below -

https://bugzilla.redhat.com/show_bug.cgi?id=1080626
https://bugzilla.redhat.com/show_bug.cgi?id=1081030
https://bugzilla.redhat.com/show_bug.cgi?id=1080642

It was hard to separate each bugfix in a separate PR as they depend on each other, but I have separated them out in different commits.