fix: check if position is occupied properly