Replace imageList.size with length(imageList) in changes from last commit. As noted by Sbesson.