Fixed repetitive error messages reported in issue #47, thanks pmeth