Fix fatal error, add better formatting