adding bug fixes