Fixed bug in module API