Changed implementation of Map interface in order to avoid concurrency
problems