Why is this not working correctly?

Resolved