Fixing some simple bugs.