SLE12 support (bnc#900660)

- includes some more bug fixes which I found during testing
I think I see similar code yesterday and have same comment here :)