Added check if entity exists