Fixed error with calculating light percentage - values only go up to 1023