Fixed some bugs and add size