fixed undefined passed into modules