Fix and formatting to commit 9350a2253d42de880e9bc16ab0c6ee0465b3b561