Minor stylistic improvement, added a test