Replaced == with .equals for comparing hostname string