Fix module dependencies bug