Some bug fixes with milestone