Code fixes before new UI