Fix directory and deadline issue