Fixes resize bug that exists on py3.4