Fixed main run function to actually be runnable