Tweak JS to ensure correct colours displayed