Changed system calls for subprocess and fixed a problem with the initialization of the joystick