implementing patch from Trygve Vea