fix undefined property notice