Fix an ugly bug that gave wrong sizes in some cases so coordinates was truncated