Fixing Rainer's bugs.