fix a crash introduced in e5e8320a3ef6b51e96968abf128b86fa035126be