fix possible use of uninitialised value