minor fixes for small bugs