Fix broken deferred code