Fix minor bugs #96