Fix bug where primary platform is not generated