Fix for issue #126 and added examples for it as well as for #111