Added check for child templates being loaded