Added a check for the system button