Oops, fixed bug in main