Cleaned up the update target logic for #18