Fix #1213 by improving the version information handling