#179 check if moduleStats is defined