fix crash introduced in previous patch