fixed crash when no category has been selected