fixed crash from last commit