fixed room is not defined error