fixed round off-by-one