Make sure modules are loaded in the correct order