fixed some minor bugs in barplots