Solving the synchronization problem on the removeNode
Fixing null pointer issues