fixes for bugs