Update module_m.php

Small changes to avoid unnecessary DB lookup