Fix unexpected behavior