Fixing several bugs.