Fixes a nasty uninitialised error that triggers under certain conditions