added patches of jguille2