Fix selenium tests to handle modes; and fix depender (noticed by selenium)