fixed bugs with delay and tranfer