Cleanup
Fix reversed if