Modified imaging_pipeline to solve bug. For ticket #86.