fixed some things for delay