Fixed AND logic and had to add a fork() in execute_command function