Fixes calling main