fixed scalar bug