fixed script compiler code ordering issue