Fix bug in colour handling