Fixed nil vs. len 0 issue in inlet