Fixed bug where incorrect module logic was being accessed