fixed barapi & ColorCode bug