chore: removed duplicate null assignment and took out an assignment to offset variable that doesn't get used