Fix some build errors due to a removed variable