fix errors for new node versions