Fixed function ordering issue.