Fix leave button visibility issue
Add base case for space check
Add base case for space check