fixing pattern recognition image pathing