Fix some bugs in guest and room function