Removed check on the wrong host, fix arithmetic.