Fix problem with colour detection