Thelia 2.1 Compatibility

Fixed module code to get 2.1 compatibility.