Moved to correct scope issue