Handling for home and exit