Fix JS

awful JS!
Overlapping squares
First color reserved for 0