Fix portal deletion bug after resize function was introduced.