Merged from master.
Fixed  some display bugs