Fix some JS errors and node position transitions