Be sure to make use of guard mode. This will give your Hastati far more staying power. You generaly wont need to pull them back since they get pushed back anyway and end up in line with the Principes. Your Hastati will still need retrainning after a couple of fights though.