fix tests, add support for auto load scripts