What's wrong? Both of my solutions seem to work correctly when I test them manually.