Updated with new handling of 404