Add null check to tickEnd hook because things happen
Removed some redundant code