fixed #303: replace %ld with % PRId64