Fix RunCode function for C