added special case for exec '$' with command prefixes