Fixed constructor that could finish the application due to parsing errors