fix image tint for different states

Tinting with different UIControlStates was failing. I cleaned up the code a bit which fixed the issue.