Fixed stupid if loop