Fix segfault + change success/fail enum