fixed ref errors in shrink