Fixed additional issue found by matthew. Added logic to check for curl