diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05688cf2..0d0844b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ get_directory_property(is-subproject PARENT_DIRECTORY)
 project(
   "mctc-lib"
   LANGUAGES "Fortran"
-  VERSION "0.2.1"
+  VERSION "0.2.2"
   DESCRIPTION "Modular computation tool chain"
 )
 
diff --git a/fpm.toml b/fpm.toml
index 0b133341..fbd9356c 100644
--- a/fpm.toml
+++ b/fpm.toml
@@ -1,5 +1,5 @@
 name = "mctc-lib"
-version = "0.2.1"
+version = "0.2.2"
 license = "Apache-2.0"
 maintainer = ["@awvwgk"]
 author = ["Sebastian Ehlert"]
diff --git a/meson.build b/meson.build
index 3d198b11..c7874d90 100644
--- a/meson.build
+++ b/meson.build
@@ -15,7 +15,7 @@
 project(
   'mctc-lib',
   'fortran',
-  version: '0.2.1',
+  version: '0.2.2',
   license: 'Apache-2.0',
   meson_version: '>=0.53',
   default_options: [
diff --git a/src/mctc/io/structure.f90 b/src/mctc/io/structure.f90
index 18bd5a45..f4920247 100644
--- a/src/mctc/io/structure.f90
+++ b/src/mctc/io/structure.f90
@@ -133,6 +133,8 @@ subroutine new_structure(self, num, sym, xyz, charge, uhf, lattice, periodic, &
 
    if (present(lattice)) then
       self%lattice = lattice
+   else
+      allocate(self%lattice(0, 0))
    end if
 
    if (present(periodic)) then
diff --git a/src/mctc/io/write/vasp.f90 b/src/mctc/io/write/vasp.f90
index c7882def..98b7d3b9 100644
--- a/src/mctc/io/write/vasp.f90
+++ b/src/mctc/io/write/vasp.f90
@@ -64,8 +64,8 @@ subroutine write_vasp(self, unit, comment_line)
    ! scaling factor for lattice parameters is always one
    write(unit, '(f20.14)') self%info%scale
    ! write the lattice parameters
-   if (allocated(self%lattice)) then
-      do i = 1, 3
+   if (any(self%periodic)) then
+      do i = 1, size(self%lattice, 2)
          write(unit, '(3f20.14)') self%lattice(:, i)*autoaa/self%info%scale
       enddo
    else
@@ -87,7 +87,7 @@ subroutine write_vasp(self, unit, comment_line)
    if (self%info%selective) write(unit, '("Selective")')
 
    ! we write cartesian coordinates
-   if (.not.allocated(self%lattice) .or. self%info%cartesian) then
+   if (any(shape(self%lattice) /= [3, 3]) .or. self%info%cartesian) then
       write(unit, '("Cartesian")')
 
       ! now write the cartesian coordinates
diff --git a/src/mctc/version.f90 b/src/mctc/version.f90
index de7473a2..b1c8f824 100644
--- a/src/mctc/version.f90
+++ b/src/mctc/version.f90
@@ -21,10 +21,10 @@ module mctc_version
 
 
    !> String representation of the mctc-lib version
-   character(len=*), parameter :: mctc_version_string = "0.2.1"
+   character(len=*), parameter :: mctc_version_string = "0.2.2"
 
    !> Numeric representation of the mctc-lib version
-   integer, parameter :: mctc_version_compact(3) = [0, 2, 1]
+   integer, parameter :: mctc_version_compact(3) = [0, 2, 2]
 
 
 contains