fix crash introduced in last commit