added check for valid selected platform