Fix #4338 and #4339

And fixed some standards.