Fixing color algo