Fixing errors discussed in pull request #16, see https://github.com/sysapps/telephony/pull/16