Fixed large use of memory issue and the input of version