Some fixes and additions from Robin