Fixed crash introduced in last commit