fixed some bugs in versioning