Fixing bugs before going 3.1