* fixed some bugs. but still more remaining.