some fixes to the processsing