Fixed for AMD usage (specifically RequireJS)