Some linux bug fixes