Fix serialization and some feature problems in modules