Fix xp error and clean tests