clean some tiny bugs and add some little feature