element and paragraph bug fixes