fixes for bug