Prevent resources being run when not required.