Updated code for platform.