Fix couple minor bugs