bug fixes for errors and warnings