Fixed a segfault on the Posix demo code
Fixed the LED simulation