Some fixes to ease testing codes