Adding bug fixes