fixes #2275

if "offset" is not specified, it messes up the calculations that follow. Apparently, it does not default to 0 in arithmetic context on some older browsers.