bug fixes to RESIZE-FILE