Fixed several ui bugs