Fixed crash (#919)