#368 martinyde - Added checks for existig elements