Room and rank detection fixes