added fix for node insertion