Initialise depth before using it.