fixed bugs in hooks and models + added fallback directory