Martin Yde - Added check for existing array