CORE-335 Script error on admin page

Also fixes CORE-336