lint fix and logic fix