fixed room undefined bug