Fixed some small bugs.