merge poupette's #43 and fix tests