Patch from @suntehnic