Fixed a bug with detecting health.