Put send_directive in correct block of code