Fixed a problem with main