fixed bug of gray scale