Fix for possible template event errors.