Still trying to fix undefined property bug