fixing startup bug