updated bug with deffered