[Bug Fix] Fix some small bugs.