Several bugfixies for v4 of scarabs