Fixing some small bugs.