Fixed a small bug that was causing images not to be copied when figure tag was not at the beginning of the line.