fixing empty nodes