Fix #574 and a lot of test problems in some configurations