Fixes for the change to targetPlatform()