Refined subprocessing and fixed bug of not returning results