small adjustments in main and client