fixed bug when using trim with color