fix some tiny bugs