added proper resize

now renders again
also removed unnecessary variables