Fix pan with empty data

Fixes #214.