fixed mixing errors