Fix bad if computation
Towards a standard library