Fix NPE in server tick