bug fixes improvements