Update style and fix bug related to directory