fixed issues in platform code engine