Fixed minor bug in the main.