Fix bug with img() function.