Fixed segmentation fault
Added Midnight entry point