fixed copy+paste bug. More rigorous test with corrected assertions