changed 'allowdelayedload' to false; fixed a scoping bug