fixed bug in genroomkey