Fix regression bug causing attrs to be undefined