port fix to other files