fixing colour logic