fixed up the end of day management command