merged patch from master