fixes some issues and adds qexp lower.tail = FALSE