Add auto resizing. and few fix.