Fixed based on answer from lsegal