this check is not necessary and it doesn't prevents race condition