Fix linear check based on solver