handle null response and fixed UI bugs

handle null response and fixed UI bugs