fix bug and delay

Signed-off-by: Tiago Maluta <tiago.maluta@gmail.com>