Khan: Another fix to the resizing function.