fixing execution of expect script