fixed sed, it's different in linux and freebsd