fixes #46, thanks pvrancx for reporting!