resolve undefined property error