attempting to fix initial undefinied errors