Fix code for Phoenix-1216 jira issue