Pinmap and small fix