Automatically calculate some settings if not set