fixed bug in pipeline