Fix some bug to make the module work agian