I think whats happening is that when the ram reaches the very top, that spring expands quite a bit allowing the spring to clamp the linkage in that upright position. Id recommended reworking the linkage from your drive to the actual ram.( maybe add another inch to the linkage that holds the bars that go to the ram? And maybe designing a roller bearing setuo for the ram guides. That or slightly tighter tolerances to the ram guide with graphite lubricant so it doesn't want to slop around too crazily