Having Timing Issues

Hi there can someone please help with this When I record then loop with Arranger Track everything is fine but when I flatten the Arranger track everything is out of time Im using Yamaha Montage as midi instrument.Thanks