Fixed bug with pre process