Fixing ui bugs and tests