Main method now also uses correct stack size