Fixing uninitialized value problem