fix/Seg fault on bad input #23