Several portTICK_RATE_MS fixes.