fix platform error