Some fixes to make it more stable, we are far from a working version