Fixes for Issues 30, 34, and 35



Signed-off-by: Karel Goderis <karel.goderis@me.com> (github: kgoderis)