midnight wrapping problem fixed