fixed bug with room recognition