some importat fixes