fix error, do check first