Fixes/issue28

Hi, 
please review patch (2 actually) fixing issue28.