Learn logic

This logic was just wrong.