Allow pinned element to resize properly

Thanks to @RoffeDH for this fix in issue #28, I've just PR'ed it :)