bug fixes for 3.6