FIx minor bugs