Fix more compiler warnings and possible display bugs