Fix undefined property notice