fixed some replanning issues, though we need better laws for initial values