Late night bug fixes