Fix a bug that will result an additional empty col at the end of the
file.