Further changes to allow production to work correctly