Added begin flip callback