Fixed some bugs and improve performance.