remove whitespaces and fix scan host return status