Removed seg fault
Run generation working