Fixes #646 (reference production server)

N.B. this branch is based on the 'feature/bug_fixes' branch, so it includes all its commits.