fixed crash caused by last commit