enhance inline elements handling