Various oej fixes (bug #3013)