bug in generating modules