Updated code to work with new syntax change.