Fixed issue with scalar while.