Corrected some small bugs.