These two lines should use the `?=` operator:

    thread.$park_count ?= 0