Fix using version before declaring it