Improve general logic.