Some further fixes made while getting this running on test server.