Fixed build dependency.
Added patch to avoid segmentation fault.