fixed bug when PanPositions collection was empty (happens with a new empty database)