unwrap module styles
fix the bug that socket is undefined
fix the bug that leave room causes error