Improve smartpan handling