Removed Data Races

I have used mutexes because it was 1 line code at 4 places that was creating race issues. Having a goroutine just to serve a one-line code did not seem right since the the goroutine will be idle most of the time.