Prevent from race condition