fixing pinning issue

fixing issue where pinning could be bypassed by setting pinned true on
the column definition even when pinning is turned off.