moved module checking below module initialization
fixed the documentation so it build properly