Added better checks for mod support.
Authored by: taiyungwang 2014-02-09
Parent: [r393]
Child: [r395]