fixing offline bugs